package com.tianya.domain.vo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class MessageVO {
    private Long messageId;
    private String title;
    private String content;
    private Long senderId;
    private String senderName;
    private Long senderRole;
    private String senderRoleName;
    private Long receiverId;
    private String receiverName;
    private Long receiverRole;
    private String receiverRoleName;
    private Boolean isRead;
    private Long replyToId;
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;
    private String timeAgo;

    // 添加以下字段，确保与processMessageVO方法一致
    private List<MessageVO> replies;  // 存储所有回复消息
    private MessageVO replyMessage;   // 如果当前消息是回复消息，存储原消息信息
}